package com.tzl.design_pattern.prototype_pattern;

import java.util.List;

/**
 * @author Zhilei Tang
 * @date Created in 2020/11/15 13:54
 */
public class PrototypeImpl_A implements IPrototype {

  private String name;
  private int age;
  private List<String> phoneList;

  @Override
  public IPrototype clone() {
    PrototypeImpl_A implA = new PrototypeImpl_A();
    implA.setAge(this.getAge());
    implA.setName(this.getName());
    implA.setPhoneList(this.getPhoneList());
    return implA;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public int getAge() {
    return age;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public List<String> getPhoneList() {
    return phoneList;
  }

  public void setPhoneList(List<String> phoneList) {
    this.phoneList = phoneList;
  }
}
